import axios from 'axios'
const baseURL = 'http://jsonplaceholder.typicode.com/'
const ajax = axios.create({
    baseURL: baseURL,
    timeout: 3000,
    headers: {
        "Content-Type":"application/json;charset=utf-8"
    }
    
})
ajax.interceptors.request.use(config => {
    // Do something before request is sent
    return config;
    },error => {
    // Do something with request error
    return Promise.reject(error);
    });
    ajax.interceptors.response.use(config=>{
        return config;
    },error => {
    // Do something with request error
    return Promise.reject(error);
    })
export default ajax